package com.ruoyi.caiwu.enums;

/**
 * 企业账户操作类型BalanceOperationTypeEnum 1：收入，  2：支出      枚举名字更改为账户明细区分BalanceTypeEnum
 * @author fl
 *
 */
public enum BalanceTypeEnum {
	
	SR("收入",1),
	ZC("支出",2);
	
	private String name;
	private int index;
	
	private BalanceTypeEnum(String name, int index) {
		this.index = index;
		this.name = name;
	}
	// 普通方法
	public static String getName(Integer index) {
		if (index == null) {
			return null;
		}
		for (BalanceTypeEnum c : BalanceTypeEnum.values()) {
			if (c.getIndex() == index) {
				return c.name;
			}
		}
		return null;
	}
	public int getIndex() {
		return index;
	}
	public void setIndex(int index) {
		this.index = index;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	

}
